projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fcbd35
)
Add type checking for Bswitch, when enabled at compile time.
author
Vibhav Pant
<vibhavp@gmail.com>
Thu, 19 Jan 2017 13:05:46 +0000
(18:35 +0530)
committer
Vibhav Pant
<vibhavp@gmail.com>
Thu, 19 Jan 2017 13:05:46 +0000
(18:35 +0530)
* src/bytecode.c: (exec_byte_code) If BYTE_CODE_SAFE is enabled at
compile time, use CHECK_TYPE to verify that the jump table is a hash table.
src/bytecode.c
patch
|
blob
|
history
diff --git
a/src/bytecode.c
b/src/bytecode.c
index fc434a2812f1dd6e4fa893dbe4c206be34ae8b53..f4540e94c9ceb055617845872e330d91ebdf4a88 100644
(file)
--- a/
src/bytecode.c
+++ b/
src/bytecode.c
@@
-1417,6
+1417,9
@@
exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{
Lisp_Object jmp_table = POP;
Lisp_Object v1 = POP;
+#ifdef BYTE_CODE_SAFE
+ CHECK_TYPE (HASH_TABLE_P (jmp_table), Qhash_table_p, jmp_table);
+#endif
struct Lisp_Hash_Table *h = XHASH_TABLE(jmp_table);
ptrdiff_t i = hash_lookup(h, v1, NULL);
if (i >= 0) {